<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="keywords" content="Hexo Theme Redefine">
    
    <meta name="author" content="xiaoeryu">
    <!-- preconnect -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>

    
    <!--- Seo Part-->
    
    <link rel="canonical" href="https://xiaoeeyu.github.io/2024/02/13/密码学初步认识/"/>
    <meta name="robots" content="index,follow">
    <meta name="googlebot" content="index,follow">
    <meta name="revisit-after" content="1 days">
    
    
    
        
        <meta name="description" content="接下来几篇文章主要是对常见加解密算法的认识和逆向分析，如果不了解加解密算法的话我们直接去分析app是比较困难的。">
<meta property="og:type" content="article">
<meta property="og:title" content="密码学初步认识">
<meta property="og:url" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/index.html">
<meta property="og:site_name" content="xiaoeryu">
<meta property="og:description" content="接下来几篇文章主要是对常见加解密算法的认识和逆向分析，如果不了解加解密算法的话我们直接去分析app是比较困难的。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213164204962.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213164952013.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213170022186.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213170028216.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213170213140.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213170221040.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213170845146.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213170916351.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213171319042.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213171407473.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213171711984.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213172202980.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213172616612.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240216113916213.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240216113927971.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240216093329714.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240216093417551.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240216110706274.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240216111055765.png">
<meta property="article:published_time" content="2024-02-13T08:38:12.000Z">
<meta property="article:modified_time" content="2024-02-17T11:02:09.357Z">
<meta property="article:author" content="xiaoeryu">
<meta property="article:tag" content="Frida Hook">
<meta property="article:tag" content="加解密算法分析">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://xiaoeeyu.github.io/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213164204962.png">
    
    
    <!--- Icon Part-->
    <link rel="icon" type="image/png" href="/images/rabete.jpg" sizes="192x192">
    <link rel="apple-touch-icon" sizes="180x180" href="/images/rabete.jpg">
    <meta name="theme-color" content="#A31F34">
    <link rel="shortcut icon" href="/images/rabete.jpg">
    <!--- Page Info-->
    
    <title>
        
            密码学初步认识 | xiaoeryu
        
    </title>

    
<link rel="stylesheet" href="/fonts/Chillax/chillax.css">


    <!--- Inject Part-->
    

    
<link rel="stylesheet" href="/css/style.css">


    
        
<link rel="stylesheet" href="/css/build/tailwind.css">

    

    
<link rel="stylesheet" href="/fonts/GeistMono/geist-mono.css">

    
<link rel="stylesheet" href="/fonts/Geist/geist.css">

    <!--- Font Part-->
    
    
    
    
    
    

    <script id="hexo-configurations">
    window.config = {"hostname":"xiaoeeyu.github.io","root":"/","language":"zh-CN","path":"search.xml"};
    window.theme = {"articles":{"style":{"font_size":"16px","line_height":1.5,"image_border_radius":"14px","image_alignment":"center","image_caption":false,"link_icon":true,"delete_mask":false,"title_alignment":"left","headings_top_spacing":{"h1":"3.2rem","h2":"2.4rem","h3":"1.9rem","h4":"1.6rem","h5":"1.4rem","h6":"1.3rem"}},"word_count":{"enable":true,"count":true,"min2read":true},"author_label":{"enable":true,"auto":false,"list":[]},"code_block":{"copy":true,"style":"mac","highlight_theme":{"light":"github","dark":"vs2015"},"font":{"enable":false,"family":null,"url":null}},"toc":{"enable":true,"max_depth":4,"number":false,"expand":true,"init_open":true},"copyright":{"enable":true,"default":"cc_by_nc_sa"},"lazyload":true,"pangu_js":false,"recommendation":{"enable":false,"title":"推荐阅读","limit":3,"mobile_limit":2,"placeholder":"/images/ball-0101.jpg","skip_dirs":[]}},"colors":{"primary":"#A31F34","secondary":null,"default_mode":"light"},"global":{"fonts":{"chinese":{"enable":false,"family":null,"url":null},"english":{"enable":false,"family":null,"url":null},"title":{"enable":false,"family":null,"url":null}},"content_max_width":"1000px","sidebar_width":"210px","hover":{"shadow":true,"scale":false},"scroll_progress":{"bar":false,"percentage":true},"website_counter":{"url":"https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js","enable":true,"site_pv":true,"site_uv":true,"post_pv":true},"single_page":true,"preloader":{"enable":false,"custom_message":null},"open_graph":true,"google_analytics":{"enable":false,"id":null}},"home_banner":{"enable":true,"style":"fixed","image":{"light":"/images/wallhaven-jxl31y.png","dark":"/images/wallhaven-o5762l.png"},"title":"XIAOERYU","subtitle":{"text":["明心见性，拨云见日","Don't wait, to create"],"hitokoto":{"enable":false,"show_author":false,"api":"https://v1.hitokoto.cn"},"typing_speed":100,"backing_speed":80,"starting_delay":500,"backing_delay":1500,"loop":true,"smart_backspace":true},"text_color":{"light":"#fff","dark":"#d1d1b6"},"text_style":{"title_size":"2.8rem","subtitle_size":"1.5rem","line_height":1.2},"custom_font":{"enable":false,"family":null,"url":null},"social_links":{"enable":true,"style":"default","links":{"github":"https://github.com/xiaoeeyu","instagram":null,"zhihu":null,"twitter":null,"email":"xiaoeryu@163.com"},"qrs":{"weixin":null}}},"plugins":{"feed":{"enable":false},"aplayer":{"enable":false,"type":"fixed","audios":[{"name":null,"artist":null,"url":null,"cover":null,"lrc":null}]},"mermaid":{"enable":false,"version":"9.3.0"}},"version":"2.8.2","navbar":{"auto_hide":false,"color":{"left":"#f78736","right":"#367df7","transparency":35},"width":{"home":"1200px","pages":"1000px"},"links":{"Home":{"path":"/","icon":"fa-regular fa-house"},"Archives":{"path":"/archives","icon":"fa-regular fa-archive"}},"search":{"enable":true,"preload":true}},"page_templates":{"friends_column":2,"tags_style":"blur"},"home":{"sidebar":{"enable":true,"position":"left","first_item":"menu","announcement":null,"show_on_mobile":true,"links":null},"article_date_format":"auto","excerpt_length":200,"categories":{"enable":true,"limit":3},"tags":{"enable":true,"limit":3}},"footerStart":"2022/8/17 11:45:14"};
    window.lang_ago = {"second":"%s 秒前","minute":"%s 分钟前","hour":"%s 小时前","day":"%s 天前","week":"%s 周前","month":"%s 个月前","year":"%s 年前"};
    window.data = {"masonry":false};
  </script>
    
    <!--- Fontawesome Part-->
    
<link rel="stylesheet" href="/fontawesome/fontawesome.min.css">

    
<link rel="stylesheet" href="/fontawesome/brands.min.css">

    
<link rel="stylesheet" href="/fontawesome/solid.min.css">

    
<link rel="stylesheet" href="/fontawesome/regular.min.css">

    
    
    
    
<meta name="generator" content="Hexo 6.3.0">
<style>.github-emoji { position: relative; display: inline-block; width: 1.2em; min-height: 1.2em; overflow: hidden; vertical-align: top; color: transparent; }  .github-emoji > span { position: relative; z-index: 10; }  .github-emoji img, .github-emoji .fancybox { margin: 0 !important; padding: 0 !important; border: none !important; outline: none !important; text-decoration: none !important; user-select: none !important; cursor: auto !important; }  .github-emoji img { height: 1.2em !important; width: 1.2em !important; position: absolute !important; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%) !important; user-select: none !important; cursor: auto !important; } .github-emoji-fallback { color: inherit; } .github-emoji-fallback img { opacity: 0 !important; }</style>
</head>



<body>
	<div class="progress-bar-container">
	

	
	<span class="pjax-progress-bar"></span>
	<!--        <span class="swup-progress-icon">-->
	<!--            <i class="fa-solid fa-circle-notch fa-spin"></i>-->
	<!--        </span>-->
	
</div>

<main class="page-container" id="swup">

	

	<div class="main-content-container flex flex-col justify-between min-h-dvh">
		<div class="main-content-header">
			<header class="navbar-container px-6 md:px-12">
    <div class="navbar-content transition-navbar ">
        <div class="left">
            
                <a class="logo-image h-8 w-8 sm:w-10 sm:h-10 mr-3" href="/">
                    <img src="/images/rabete.jpg" class="w-full h-full rounded-sm">
                </a>
            
            <a class="logo-title" href="/">
                
                xiaoeryu
                
            </a>
        </div>

        <div class="right">
            <!-- PC -->
            <div class="desktop">
                <ul class="navbar-list">
                    
                        
                            

                            <li class="navbar-item">
                                <!-- Menu -->
                                <a class=""
                                   href="/"
                                        >
                                    <i class="fa-regular fa-house fa-fw"></i>
                                    首页
                                    
                                </a>

                                <!-- Submenu -->
                                
                            </li>
                    
                        
                            

                            <li class="navbar-item">
                                <!-- Menu -->
                                <a class=""
                                   href="/archives"
                                        >
                                    <i class="fa-regular fa-archive fa-fw"></i>
                                    归档
                                    
                                </a>

                                <!-- Submenu -->
                                
                            </li>
                    
                    
                        <li class="navbar-item search search-popup-trigger">
                            <i class="fa-solid fa-magnifying-glass"></i>
                        </li>
                    
                </ul>
            </div>
            <!-- Mobile -->
            <div class="mobile">
                
                    <div class="icon-item search search-popup-trigger"><i class="fa-solid fa-magnifying-glass"></i>
                    </div>
                
                <div class="icon-item navbar-bar">
                    <div class="navbar-bar-middle"></div>
                </div>
            </div>
        </div>
    </div>

    <!-- Mobile sheet -->
    <div class="navbar-drawer h-dvh w-full absolute top-0 left-0 bg-background-color flex flex-col justify-between">
        <ul class="drawer-navbar-list flex flex-col px-4 justify-center items-start">
            
                
                    

                    <li class="drawer-navbar-item text-base my-1.5 flex flex-col w-full">
                        
                        <a class="py-1.5 px-2 flex flex-row items-center justify-between gap-1 hover:!text-primary active:!text-primary text-2xl font-semibold group border-b border-border-color hover:border-primary w-full "
                           href="/"
                        >
                            <span>
                                首页
                            </span>
                            
                                <i class="fa-regular fa-house fa-sm fa-fw"></i>
                            
                        </a>
                        

                        
                    </li>
            
                
                    

                    <li class="drawer-navbar-item text-base my-1.5 flex flex-col w-full">
                        
                        <a class="py-1.5 px-2 flex flex-row items-center justify-between gap-1 hover:!text-primary active:!text-primary text-2xl font-semibold group border-b border-border-color hover:border-primary w-full "
                           href="/archives"
                        >
                            <span>
                                归档
                            </span>
                            
                                <i class="fa-regular fa-archive fa-sm fa-fw"></i>
                            
                        </a>
                        

                        
                    </li>
            

            
            
        </ul>

        <div class="statistics flex justify-around my-2.5">
    <a class="item tag-count-item flex flex-col justify-center items-center w-20" href="/tags">
        <div class="number text-2xl sm:text-xl text-second-text-color font-semibold">92</div>
        <div class="label text-third-text-color text-sm">标签</div>
    </a>
    <a class="item tag-count-item flex flex-col justify-center items-center w-20" href="/categories">
        <div class="number text-2xl sm:text-xl text-second-text-color font-semibold">14</div>
        <div class="label text-third-text-color text-sm">分类</div>
    </a>
    <a class="item tag-count-item flex flex-col justify-center items-center w-20" href="/archives">
        <div class="number text-2xl sm:text-xl text-second-text-color font-semibold">112</div>
        <div class="label text-third-text-color text-sm">文章</div>
    </a>
</div>
    </div>

    <div class="window-mask"></div>

</header>


		</div>

		<div class="main-content-body transition-fade-up">
			

			<div class="main-content">
				<div class="post-page-container flex relative justify-between box-border w-full h-full">
	<div class="article-content-container">

		<div class="article-title relative w-full">
			
			<div class="w-full flex items-center pt-6 justify-start">
				<h1 class="article-title-regular text-second-text-color tracking-tight text-4xl md:text-6xl font-semibold px-2 sm:px-6 md:px-8 py-3">密码学初步认识</h1>
			</div>
			
		</div>

		
		<div class="article-header flex flex-row gap-2 items-center px-2 sm:px-6 md:px-8">
			<div class="avatar w-[46px] h-[46px] flex-shrink-0 rounded-medium border border-border-color p-[1px]">
				<img src="/images/rabete.jpg">
			</div>
			<div class="info flex flex-col justify-between">
				<div class="author flex items-center">
					<span class="name text-default-text-color text-lg font-semibold">xiaoeryu</span>
					
					<span class="author-label ml-1.5 text-xs px-2 py-0.5 rounded-small text-third-text-color border border-shadow-color-1">Lv5</span>
					
				</div>
				<div class="meta-info">
					<div class="article-meta-info">
    <span class="article-date article-meta-item">
        <i class="fa-regular fa-pen-fancy"></i>&nbsp;
        <span class="desktop">2024-02-13 16:38:12</span>
        <span class="mobile">2024-02-13 16:38:12</span>
        <span class="hover-info">创建</span>
    </span>
    
        <span class="article-date article-meta-item">
            <i class="fa-regular fa-wrench"></i>&nbsp;
            <span class="desktop">2024-02-17 19:02:09</span>
            <span class="mobile">2024-02-17 19:02:09</span>
            <span class="hover-info">更新</span>
        </span>
    

    
        <span class="article-categories article-meta-item">
            <i class="fa-regular fa-folders"></i>&nbsp;
            <ul>
                
                
                    
                        
                        <li>
                            <a href="/categories/Android%E9%80%86%E5%90%91/">Android逆向</a>&nbsp;
                        </li>
                    
                    
                
            </ul>
        </span>
    
    
        <span class="article-tags article-meta-item">
            <i class="fa-regular fa-tags"></i>&nbsp;
            <ul>
                
                    <li>
                        <a href="/tags/Frida-Hook/">Frida Hook</a>&nbsp;
                    </li>
                
                    <li>
                        | <a href="/tags/%E5%8A%A0%E8%A7%A3%E5%AF%86%E7%AE%97%E6%B3%95%E5%88%86%E6%9E%90/">加解密算法分析</a>&nbsp;
                    </li>
                
            </ul>
        </span>
    

    
    
    
    
        <span class="article-pv article-meta-item">
            <i class="fa-regular fa-eye"></i>&nbsp;<span id="busuanzi_value_page_pv"></span>
        </span>
    
</div>

				</div>
			</div>
		</div>
		

		


		<div class="article-content markdown-body px-2 sm:px-6 md:px-8 pb-8">
			<p>接下来几篇文章主要是对常见加解密算法的认识和逆向分析，如果不了解加解密算法的话我们直接去分析app是比较困难的。</p>
<span id="more"></span>

<img lazyload="" src="/images/loading.svg" data-src="/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213164204962.png" class="" title="image-20240213164204962">

<p>接下来几篇文章要达到的目的：</p>
<ol>
<li>掌握常见的加解密算法的基本原理</li>
<li>掌握对app逆向分析过程中快算识别，使用的标准加解密算法的方法</li>
</ol>
<p>算法简单分类</p>
<ol>
<li>对称密码<ol>
<li>序列密码（流密码）：将明文消息按字符逐位进行加密。（RC4）</li>
<li>分组密码：将明文消息分组（每组有多个字符可能非常多，可以有几M甚至几个G），逐组进行加密。（ABS、AES）</li>
</ol>
</li>
<li>非对称密码</li>
<li>散列算法（消息摘要）</li>
</ol>
<h3 id="BASE64编码简介"><a href="#BASE64编码简介" class="headerlink" title="BASE64编码简介"></a>BASE64编码简介</h3><p>像BASE16、BASE32、BASE64、BASE85、BASE36、BASE58、BASE91、BASE92、BASE62，这些都是编码方式，对应有各自的一套编码算法。类似的还有url编码。</p>
<p>有些时候也会称这些为加密，例如经常有人说BASE64加密。其实这种说法不太严谨，这些都是对信息的一种编码表示形式，并不涉及到加密密钥key。因此，只要得到了对应的编码算法，也就是拿到了对应的密钥。</p>
<p>BASE64编码是网络上最常用的用于传输字节信息的编码方式之一，BASE64就是一种基于64个可打印字符来表示二进制数据的方法。其它BASE家族的编码也是同理。</p>
<h6 id="BASE64编码原理：用64个可见字符来表示8bite位二进制（A-Z、a-z、0-9、“-”、“-x2F-”、还有“-x3D-”用于填充）。"><a href="#BASE64编码原理：用64个可见字符来表示8bite位二进制（A-Z、a-z、0-9、“-”、“-x2F-”、还有“-x3D-”用于填充）。" class="headerlink" title="BASE64编码原理：用64个可见字符来表示8bite位二进制（A-Z、a-z、0-9、“+”、“/”、还有“=”用于填充）。"></a>BASE64编码原理：用64个可见字符来表示8bite位二进制（A-Z、a-z、0-9、“+”、“/”、还有“=”用于填充）。</h6><h6 id="BASE32编码原理：用32个可见字符来表示8bite位二进制（A-Z、2-7）。"><a href="#BASE32编码原理：用32个可见字符来表示8bite位二进制（A-Z、2-7）。" class="headerlink" title="BASE32编码原理：用32个可见字符来表示8bite位二进制（A-Z、2-7）。"></a>BASE32编码原理：用32个可见字符来表示8bite位二进制（A-Z、2-7）。</h6><p>Android中的BASE64编码使用android.util包下提供的Base64类，其中提供了Base64编码和解码相关的API可以直接使用。</p>
<h3 id="BASE64在反汇编后的表现形式"><a href="#BASE64在反汇编后的表现形式" class="headerlink" title="BASE64在反汇编后的表现形式"></a>BASE64在反汇编后的表现形式</h3><p>在代码没有加混淆的时候，我们用GDA反编译看一下它的java代码</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213164952013.png" class="" title="image-20240213164952013">

<ul>
<li><p>此时反编译出来的都是明文，我们可以直接看到代码调用了Base64.encodeToString()</p>
</li>
<li><p>如果是自己实现的base64或者在有名称混淆的情况下，就没有这个容易分辨出来了</p>
<blockquote>
<p>遇到这种情况，可以考虑使用hook的方法去主动调用其中的方法，给它传入一个参数，然后看它的返回结果是什么</p>
</blockquote>
</li>
</ul>
<h3 id="so文件中的base64"><a href="#so文件中的base64" class="headerlink" title="so文件中的base64"></a>so文件中的base64</h3><p>将so文件提取出来放在ida中分析，可以通过字符串（CTRL+F12）中的base64编码表定位到其被调用的位置</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213170022186.png" class="" title="image-20240213170022186">

<img lazyload="" src="/images/loading.svg" data-src="/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213170028216.png" class="" title="image-20240213170028216">

<ul>
<li>这些也是在没有加壳也没有混淆的情况下，直接就可以定位到。然后<strong>F5</strong>就可以很清晰的反编译出来</li>
</ul>
<h3 id="加了ollvm后so文件中的base64"><a href="#加了ollvm后so文件中的base64" class="headerlink" title="加了ollvm后so文件中的base64"></a>加了ollvm后so文件中的base64</h3><img lazyload="" src="/images/loading.svg" data-src="/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213170213140.png" class="" title="image-20240213170213140">

<img lazyload="" src="/images/loading.svg" data-src="/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213170221040.png" class="" title="image-20240213170221040">

<ul>
<li>此时虽然还是相同的代码，但是反编译结果的流程就已经完全被打乱看不出来是什么函数了。整个流程看起来非常的复杂。想要直接分析这个是非常困难的</li>
<li>对于这种情况我们可以考虑使用重放攻击，也就是我们再前面说的主动去调用这个函数，给他传入参数看它的输出结果</li>
</ul>
<h4 id="尝试分析"><a href="#尝试分析" class="headerlink" title="尝试分析"></a>尝试分析</h4><h6 id="要使用重放攻击，首先我们要搞明白目标函数是哪一个它的地址在哪，然后分析出它的传参是什么"><a href="#要使用重放攻击，首先我们要搞明白目标函数是哪一个它的地址在哪，然后分析出它的传参是什么" class="headerlink" title="要使用重放攻击，首先我们要搞明白目标函数是哪一个它的地址在哪，然后分析出它的传参是什么"></a>要使用重放攻击，首先我们要搞明白目标函数是哪一个它的地址在哪，然后分析出它的传参是什么</h6><p>首先，我们照常根据字符串中的编码表定位到调用函数，然后F5查看这个函数的交叉引用</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213170845146.png" class="" title="image-20240213170845146">

<ul>
<li>看到有一个交叉引用，我们跟进去看一下</li>
</ul>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213170916351.png" class="" title="image-20240213170916351">

<ul>
<li><p>进来之后发现这个函数经过ollvm后还是相对比较简单的，是一个JNI函数。这里我们可以去用GDA或者GADX反编译一下看看它的定义。根据定义看看是否需要修改一下ida的识别结果</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213171319042.png" class="" title="image-20240213171319042">

<ul>
<li>首先它的参数是一个str类型</li>
</ul>
</li>
<li><p>根据定义修改函数的变量</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213171407473.png" class="" title="image-20240213171407473">

<ul>
<li><p>第三个参数是我们输入的字符日，前面两个是隐藏参数（参数1：JNIEnv*，参数2：调用者：静态为jclass、非静态为：jobject）</p>
</li>
<li><p>sub_19D6会接收我们输入的字符串，然后返回一个值。进入查看一下这个函数</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213171711984.png" class="" title="image-20240213171711984">

<ul>
<li>函数的返回值类型是<strong>const char</strong>*，函数的参数类型识别错误了手动修改一下。返回值是C格式的<strong>UTF-8</strong>字符串指针</li>
</ul>
</li>
<li><p>再返回上一级分析循环代码可知在下一轮循环中就进入了<strong>sub_834</strong></p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213172202980.png" class="" title="image-20240213172202980">

<ul>
<li>弄清楚了这个函数的大概作用和接收的参数后，可以写frida脚本来验证一下这个函数的输入和返回</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3 id="Frida脚本"><a href="#Frida脚本" class="headerlink" title="Frida脚本"></a>Frida脚本</h3><pre><code class="js">function activeinvokesub_834(content){
    var offset = 0x834 + 1;		// 直接通过硬偏移调用，这个地址为：函数所在偏移+1
    var nativelibmodule = Process.getModuleByName("libnative-lib.so");
    var addr = nativelibmodule.base.add(offset);	// 基址加上偏移

    var arg0 = Memory.allocUtf8String(content);

    var sub_834 = new NativeFunction(addr, 'pointer', ['pointer']);
    var result = sub_834(arg0);
    console.log("result: ",hexdump(result, {length: 16, header: true, ansi: true}));
}
</code></pre>
<ul>
<li><p>打开手机端frida-server，执行frida命令附加我们的脚本执行</p>
<p><code>frida -U com.kanxue.encrypt01 -l base64.js</code></p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240213172616612.png" class="" title="image-20240213172616612">

<ul>
<li>上图可以看到我们的脚本被正确的附加且执行了</li>
</ul>
</li>
</ul>
<h3 id="针对函数进行重放攻击"><a href="#针对函数进行重放攻击" class="headerlink" title="针对函数进行重放攻击"></a>针对函数进行重放攻击</h3><ol>
<li>针对java实现的函数，可以简单编写frida脚本或xposed插件对函数进行主动调用。只需要知道类名和函数名就ok，对于加壳的app可能会出现找不到类找不到函数等问题，这些问题的根本原因还是使用的classloader不对，只有加载了这个class的classloader才可以找到这个类。</li>
<li>针对so中的函数，推荐使用frida脚本进行主动调用，较为简洁，当然使用xposed也可以。如果是导出函数就比较简单只需要在frida中遍历它的符号表就可以拿到函数地址。使用xposed也可以，使用dlopen、dlsym也可以快速的拿到函数地址。如果没有导出的话就需要去找到函数的基址和偏移</li>
</ol>
<h3 id="加壳的ollvm分析"><a href="#加壳的ollvm分析" class="headerlink" title="加壳的ollvm分析"></a>加壳的ollvm分析</h3><p>接下来是对加壳了的app的处理流程，怎么去快速的定位加解密算法相关的类，然后对类中的函数进行调用</p>
<h4 id="脱壳"><a href="#脱壳" class="headerlink" title="脱壳"></a>脱壳</h4><p>分析软件，对于能脱壳的就先把壳脱掉。</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240216113916213.png" class="" title="image-20240216113916213">

<img lazyload="" src="/images/loading.svg" data-src="/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240216113927971.png" class="" title="image-20240216113927971">

<p>这里使用<a class="link" target="_blank" rel="noopener" href="https://github.com/jas502n/FART-dump">frida_fart<i class="fa-solid fa-arrow-up-right ml-[0.2em] font-light align-text-top text-[0.7em] link-icon"></i></a>脚本来脱壳：</p>
<blockquote>
<p>脚本使用方法在脚本中有说明，这里说一下大致使用流程</p>
<ol>
<li><p>将加壳app安装到手机上</p>
</li>
<li><p>运行脚本脱壳<code>frida -U -f com.kanxue.encrypt01 -l frida_fart_hook.js --no-pause</code>，对于没有存储权限的app把脚本中的savepath设置为app包所在的路径</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240216093329714.png" class="" title="image-20240216093329714">
</li>
<li><p>调用**fart()**对codeitem进行一个dump<code>fart()</code></p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240216093417551.png" class="" title="image-20240216093417551"></li>
</ol>
</blockquote>
<p>当然脱壳方法非常多，把pixel刷入脱壳机的rom也可以</p>
<h3 id="分析dex"><a href="#分析dex" class="headerlink" title="分析dex"></a>分析dex</h3><p>通过文本搜索找到包含MainActivity的文件，然后用GDA反编译</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240216110706274.png" class="" title="image-20240216110706274">

<img lazyload="" src="/images/loading.svg" data-src="/2024/02/13/%E5%AF%86%E7%A0%81%E5%AD%A6%E5%88%9D%E6%AD%A5%E8%AE%A4%E8%AF%86/image-20240216111055765.png" class="" title="image-20240216111055765">

<ul>
<li><p>反编译出来之后尝试用<strong>Java.perform()</strong> HOOK **caicaikan()**这个函数</p>
</li>
<li><p>这个函数是一个非静态函数，有一个string参数。对于一个非静态的函数我们需要一个实例才能对其进行主动调用</p>
<blockquote>
<pre><code class="js">function activeinvokejavafunc(content){
    Java.perform(function () {
        // com.kanxue.encrypt01.MainActivity
        var mainActivityClass = Java.use("com.kanxue.encrypt01.MainActivity");
        console.log("mainActivityClass: ", mainActivityClass);

        // public String caicaikan(String content)
        Java.choose("com.kanxue.encrypt01.MainActivity",{
            onMatch:function(obj){
                console.log("found obj: ", obj);
                var result = obj.caicaikan(content);
                console.log("result: ", result);
            },onComplete:function(){
                console.log("search heap complete");
            }
        })
    })
}
</code></pre>
</blockquote>
</li>
<li><p>对于这种情况可以直接调用就行</p>
</li>
</ul>
<p>如果一个app使用动态加载的方式，加载了一些插件中的classloader的时候，我们就需要使用frida中枚举的方式去遍历所有的classloader。枚举到了我们就把这个classloader设置为当前的classload，来进行主动调用。</p>
<blockquote>
<pre><code class="js">function activeinvokejavafunc(content){
    Java.perform(function () {
        Java.enumerateClassLoadersSync().forEach(function(classloader){
            console.log(classloader);
        });
        
        Java.enumerateClassLoadersSync().forEach(function(classloader){
            try {
                console.log(classloader);
                classloader.loadClass("com.kanxue.encrypt01.MainActivity");
                Java.classFactory.loader = classloader;

                // com.kanxue.encrypt01.MainActivity
                var mainActivityClass = Java.use("com.kanxue.encrypt01.MainActivity");
                console.log("mainActivityClass: ", mainActivityClass);

                // public String caicaikan(String content)
                Java.choose("com.kanxue.encrypt01.MainActivity",{
                    onMatch:function(obj){
                        console.log("found obj: ", obj);
                        var result = obj.caicaikan(content);
                        console.log("result: ", result);
                    },onComplete:function(){
                        console.log("search heap complete");
                    }
                })
            } catch (error) {
                console.log("error: ", error);
            }
        })
    })
}
</code></pre>
</blockquote>
<p>总结：针对函数进行重放攻击</p>
<ol>
<li>针对java实现的函数，可以简单编写frida脚本或者xposed插件对函数进行主动调用</li>
<li>针对so中的函数，推荐使用frida脚本进行主动调用，较为简单快捷；当然xposed也可以</li>
</ol>

		</div>

		
		<div class="post-copyright-info w-full my-8 px-2 sm:px-6 md:px-8">
			<div class="article-copyright-info-container">
    <ul>
        <li><strong>标题:</strong> 密码学初步认识</li>
        <li><strong>作者:</strong> xiaoeryu</li>
        <li><strong>创建于
                :</strong> 2024-02-13 16:38:12</li>
        
            <li>
                <strong>更新于
                    :</strong> 2024-02-17 19:02:09
            </li>
        
        <li>
            <strong>链接:</strong> https://github.com/xiaoeryu/2024/02/13/密码学初步认识/
        </li>
        <li>
            <strong>
                版权声明:
            </strong>
            

            
                本文章采用 <a class="license" target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0">CC BY-NC-SA 4.0</a> 进行许可。
            
        </li>
    </ul>
</div>

		</div>
		

		
		<ul class="post-tags-box text-lg mt-1.5 flex-wrap justify-center flex md:hidden">
			
			<li class="tag-item mx-0.5">
				<a href="/tags/Frida-Hook/">#Frida Hook</a>&nbsp;
			</li>
			
			<li class="tag-item mx-0.5">
				<a href="/tags/%E5%8A%A0%E8%A7%A3%E5%AF%86%E7%AE%97%E6%B3%95%E5%88%86%E6%9E%90/">#加解密算法分析</a>&nbsp;
			</li>
			
		</ul>
		

		

		
		<div class="article-nav my-8 flex justify-between items-center px-2 sm:px-6 md:px-8">
			
			<div class="article-prev border-border-color shadow-redefine-flat shadow-shadow-color-2 rounded-medium px-4 py-2 hover:shadow-redefine-flat-hover hover:shadow-shadow-color-2">
				<a class="prev" rel="prev" href="/2024/02/21/%E5%BA%8F%E5%88%97%E5%AF%86%E7%A0%81RC4%E7%90%86%E8%AE%BA%E7%AF%87/">
					<span class="left arrow-icon flex justify-center items-center">
						<i class="fa-solid fa-chevron-left"></i>
					</span>
					<span class="title flex justify-center items-center">
						<span class="post-nav-title-item">序列密码RC4理论篇</span>
						<span class="post-nav-item">上一篇</span>
					</span>
				</a>
			</div>
			
			
			<div class="article-next border-border-color shadow-redefine-flat shadow-shadow-color-2 rounded-medium px-4 py-2 hover:shadow-redefine-flat-hover hover:shadow-shadow-color-2">
				<a class="next" rel="next" href="/2023/12/25/so%E5%87%BD%E6%95%B0Hook%EF%BC%88%E4%B8%8A%EF%BC%89/">
					<span class="title flex justify-center items-center">
						<span class="post-nav-title-item">so函数Hook（上）</span>
						<span class="post-nav-item">下一篇</span>
					</span>
					<span class="right arrow-icon flex justify-center items-center">
						<i class="fa-solid fa-chevron-right"></i>
					</span>
				</a>
			</div>
			
		</div>
		


		
		<div class="comment-container px-2 sm:px-6 md:px-8 pb-8">
			<div class="comments-container mt-10 w-full ">
    <div id="comment-anchor" class="w-full h-2.5"></div>
    <div class="comment-area-title w-full my-1.5 md:my-2.5 text-xl md:text-3xl font-bold">
        评论
    </div>
    

        
            


        
    
</div>

		</div>
		
	</div>

	
	<div class="toc-content-container">
		<div class="post-toc-wrap">
	<div class="post-toc">
		<div class="toc-title">目录</div>
		<div class="page-title">密码学初步认识</div>
		<ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#BASE64%E7%BC%96%E7%A0%81%E7%AE%80%E4%BB%8B"><span class="nav-text">BASE64编码简介</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#BASE64%E5%9C%A8%E5%8F%8D%E6%B1%87%E7%BC%96%E5%90%8E%E7%9A%84%E8%A1%A8%E7%8E%B0%E5%BD%A2%E5%BC%8F"><span class="nav-text">BASE64在反汇编后的表现形式</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#so%E6%96%87%E4%BB%B6%E4%B8%AD%E7%9A%84base64"><span class="nav-text">so文件中的base64</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%8A%A0%E4%BA%86ollvm%E5%90%8Eso%E6%96%87%E4%BB%B6%E4%B8%AD%E7%9A%84base64"><span class="nav-text">加了ollvm后so文件中的base64</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#%E5%B0%9D%E8%AF%95%E5%88%86%E6%9E%90"><span class="nav-text">尝试分析</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Frida%E8%84%9A%E6%9C%AC"><span class="nav-text">Frida脚本</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E9%92%88%E5%AF%B9%E5%87%BD%E6%95%B0%E8%BF%9B%E8%A1%8C%E9%87%8D%E6%94%BE%E6%94%BB%E5%87%BB"><span class="nav-text">针对函数进行重放攻击</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%8A%A0%E5%A3%B3%E7%9A%84ollvm%E5%88%86%E6%9E%90"><span class="nav-text">加壳的ollvm分析</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#%E8%84%B1%E5%A3%B3"><span class="nav-text">脱壳</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%88%86%E6%9E%90dex"><span class="nav-text">分析dex</span></a></li></ol>

	</div>
</div>
	</div>
	
</div>
			</div>

			
		</div>

		<div class="main-content-footer">
			<footer class="footer mt-5 py-5 h-auto text-base text-third-text-color relative border-t-2 border-t-border-color">
    <div class="info-container py-3 text-center">
        
        <div class="text-center">
            &copy;
            
              <span>2022</span>
              -
            
            2025&nbsp;&nbsp;<i class="fa-solid fa-heart fa-beat" style="--fa-animation-duration: 0.5s; color: #f54545"></i>&nbsp;&nbsp;<a href="/">xiaoeryu</a>
            
                
                <p class="post-count space-x-0.5">
                    <span>
                        共撰写了 112 篇文章
                    </span>
                    
                </p>
            
        </div>
        
            <script data-swup-reload-script src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
            <div class="relative text-center lg:absolute lg:right-[20px] lg:top-1/2 lg:-translate-y-1/2 lg:text-right">
                
                    <span id="busuanzi_container_site_uv" class="lg:!block">
                        <span class="text-sm">访问人数</span>
                        <span id="busuanzi_value_site_uv"></span>
                    </span>
                
                
                    <span id="busuanzi_container_site_pv" class="lg:!block">
                        <span class="text-sm">总访问量</span>
                        <span id="busuanzi_value_site_pv"></span>
                    </span>
                
            </div>
        
        <div class="relative text-center lg:absolute lg:left-[20px] lg:top-1/2 lg:-translate-y-1/2 lg:text-left">
            <span class="lg:block text-sm">由 <?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="relative top-[2px] inline-block align-baseline" version="1.1" id="圖層_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1rem" height="1rem" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"><path fill="#0E83CD" d="M256.4,25.8l-200,115.5L56,371.5l199.6,114.7l200-115.5l0.4-230.2L256.4,25.8z M349,354.6l-18.4,10.7l-18.6-11V275H200v79.6l-18.4,10.7l-18.6-11v-197l18.5-10.6l18.5,10.8V237h112v-79.6l18.5-10.6l18.5,10.8V354.6z"/></svg><a target="_blank" class="text-base" href="https://hexo.io">Hexo</a> 驱动</span>
            <span class="text-sm lg:block">主题&nbsp;<a class="text-base" target="_blank" href="https://github.com/EvanNotFound/hexo-theme-redefine">Redefine v2.8.2</a></span>
        </div>
        
        
            <div>
                博客已运行 <span class="odometer" id="runtime_days" ></span> 天 <span class="odometer" id="runtime_hours"></span> 小时 <span class="odometer" id="runtime_minutes"></span> 分钟 <span class="odometer" id="runtime_seconds"></span> 秒
            </div>
        
        
            <script data-swup-reload-script>
                try {
                    function odometer_init() {
                    const elements = document.querySelectorAll('.odometer');
                    elements.forEach(el => {
                        new Odometer({
                            el,
                            format: '( ddd).dd',
                            duration: 200
                        });
                    });
                    }
                    odometer_init();
                } catch (error) {}
            </script>
        
        
        
    </div>  
</footer>
		</div>
	</div>

	
	<div class="post-tools">
		<div class="post-tools-container">
	<ul class="article-tools-list">
		<!-- TOC aside toggle -->
		
		<li class="right-bottom-tools page-aside-toggle">
			<i class="fa-regular fa-outdent"></i>
		</li>
		

		<!-- go comment -->
		
		<li class="go-comment">
			<i class="fa-regular fa-comments"></i>
		</li>
		
	</ul>
</div>
	</div>
	

	<div class="right-side-tools-container">
		<div class="side-tools-container">
	<ul class="hidden-tools-list">
		<li class="right-bottom-tools tool-font-adjust-plus flex justify-center items-center">
			<i class="fa-regular fa-magnifying-glass-plus"></i>
		</li>

		<li class="right-bottom-tools tool-font-adjust-minus flex justify-center items-center">
			<i class="fa-regular fa-magnifying-glass-minus"></i>
		</li>

		<li class="right-bottom-tools tool-dark-light-toggle flex justify-center items-center">
			<i class="fa-regular fa-moon"></i>
		</li>

		<!-- rss -->
		

		

		<li class="right-bottom-tools tool-scroll-to-bottom flex justify-center items-center">
			<i class="fa-regular fa-arrow-down"></i>
		</li>
	</ul>

	<ul class="visible-tools-list">
		<li class="right-bottom-tools toggle-tools-list flex justify-center items-center">
			<i class="fa-regular fa-cog fa-spin"></i>
		</li>
		
		<li class="right-bottom-tools tool-scroll-to-top flex justify-center items-center">
			<i class="arrow-up fas fa-arrow-up"></i>
			<span class="percent"></span>
		</li>
		
		
	</ul>
</div>
	</div>

	<div class="image-viewer-container">
	<img src="">
</div>

	
	<div class="search-pop-overlay">
	<div class="popup search-popup">
		<div class="search-header">
			<span class="search-input-field-pre">
				<i class="fa-solid fa-keyboard"></i>
			</span>
			<div class="search-input-container">
				<input autocomplete="off" autocorrect="off" autocapitalize="off" placeholder="站内搜索您需要的内容..." spellcheck="false" type="search" class="search-input">
			</div>
			<span class="popup-btn-close">
				<i class="fa-solid fa-times"></i>
			</span>
		</div>
		<div id="search-result">
			<div id="no-result">
				<i class="fa-solid fa-spinner fa-spin-pulse fa-5x fa-fw"></i>
			</div>
		</div>
	</div>
</div>
	

</main>



<script src="/js/build/libs/Swup.min.js"></script>

<script src="/js/build/libs/SwupSlideTheme.min.js"></script>

<script src="/js/build/libs/SwupScriptsPlugin.min.js"></script>

<script src="/js/build/libs/SwupProgressPlugin.min.js"></script>

<script src="/js/build/libs/SwupScrollPlugin.min.js"></script>

<script src="/js/build/libs/SwupPreloadPlugin.min.js"></script>

<script>
    const swup = new Swup({
        plugins: [
            new SwupScriptsPlugin({
                optin: true,
            }),
            new SwupProgressPlugin(),
            new SwupScrollPlugin({
                offset: 80,
            }),
            new SwupSlideTheme({
                mainElement: ".main-content-body",
            }),
            new SwupPreloadPlugin(),
        ],
        containers: ["#swup"],
    });
</script>




	
<script src="/js/build/tools/imageViewer.js" type="module"></script>

<script src="/js/build/utils.js" type="module"></script>

<script src="/js/build/main.js" type="module"></script>

<script src="/js/build/layouts/navbarShrink.js" type="module"></script>

<script src="/js/build/tools/scrollTopBottom.js" type="module"></script>

<script src="/js/build/tools/lightDarkSwitch.js" type="module"></script>

<script src="/js/build/layouts/categoryList.js" type="module"></script>



    
<script src="/js/build/tools/localSearch.js" type="module"></script>




    
<script src="/js/build/tools/codeBlock.js" type="module"></script>




    
<script src="/js/build/layouts/lazyload.js" type="module"></script>




    
<script src="/js/build/tools/runtime.js"></script>

    
<script src="/js/build/libs/odometer.min.js"></script>

    
<link rel="stylesheet" href="/assets/odometer-theme-minimal.css">




  
<script src="/js/build/libs/Typed.min.js"></script>

  
<script src="/js/build/plugins/typed.js" type="module"></script>








    
<script src="/js/build/libs/anime.min.js"></script>





    
<script src="/js/build/tools/tocToggle.js" type="module" data-swup-reload-script=""></script>

<script src="/js/build/layouts/toc.js" type="module" data-swup-reload-script=""></script>

<script src="/js/build/plugins/tabs.js" type="module" data-swup-reload-script=""></script>




<script src="/js/build/libs/moment-with-locales.min.js" data-swup-reload-script=""></script>


<script src="/js/build/layouts/essays.js" type="module" data-swup-reload-script=""></script>





	
</body>

</html>